﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;

/// <summary>
/// RoleMenu 的摘要说明
/// </summary>
public class RoleMenuDao
{
	public RoleMenuDao()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
    }
    //添加
    public static void add(string roleId, string menuId)
    {
        OleDbConnection conn = DB.conn();
        if (conn != null && roleId.Trim().Length>0 && menuId.Trim().Length>0)
        {
            conn.Open();
            OleDbCommand comm = new OleDbCommand();
            comm.Connection = conn;
            comm.CommandText = "insert into role_Menu (roleId,menuId) values(" + roleId + "," + menuId + ")";
            try { comm.ExecuteNonQuery(); }
            catch (Exception ex) { throw ex; }
            finally { comm.Dispose(); conn.Close(); }
        }
    }
}
